<?php
namespace app\common\controller;

use think\Controller;
use think\Lang;

class CommonBase extends Controller
{
	protected function _initialize()
	{
		parent::_initialize();

		//define __ROOT__
		if (!defined('__ROOT__')) {
			$_root = rtrim(dirname(rtrim($_SERVER['SCRIPT_NAME'], '/')), '/');
			define('__ROOT__', (('/' == $_root || '\\' == $_root) ? '' : $_root));
		}

		if (!defined('MODULE_NAME')){define('MODULE_NAME', $this->request->module());}
		if (!defined('CONTROLLER_NAME')){define('CONTROLLER_NAME', $this->request->controller());}
		if (!defined('ACTION_NAME')){define('ACTION_NAME', $this->request->action());}


	}

}